<template>
  <el-dialog
    title="删除部门"
    :visible.sync="delDepDialogVisible"
    :before-close="handleClose"
    class="dialog_d"
  >
    <el-table :data="deptData" style="width: 100%" border>
      <el-table-column prop="departmentName" label="部门名称" align="center">
      </el-table-column>
      <el-table-column fixed="right" label="操作" align="center">
        <template slot-scope="scope">
          <el-button
            @click.native.prevent="deleteRow(scope.row)"
            type="text"
            size="small"
          >
            删除
          </el-button>
        </template>
      </el-table-column>
    </el-table>

    <div slot="footer" class="dialog-footer">
      <el-button type="primary" @click="handleClose">确认</el-button>
      <el-button @click="handleClose" class="resletBtn">取消</el-button>
    </div>
  </el-dialog>
</template>

<script>
export default {
  name: "DelDeptDialog",
  props: ["delDepDialogVisible", "deptData"],
  data() {
    return {};
  },
  methods: {
    handleClose() {
      this.$emit("close");
    },
    save() {
      this.$emit("save");
    },
    deleteRow(row) {
      this.$emit("deleteRow", row);
    },
  },
  created() {},
};
</script>
<style lang="scss" scoped>
.dialog_d {
  .el-dialog {
    width: 700px;
    .el-dialog__body {
      padding: 0;
      box-sizing: border-box;
      position: relative;
      .elForm {
        width: 100%;
        .jsForm {
          position: relative;
        }
        .addbtn_ {
          position: absolute;
          right: -31px;
          top: 1px;
          font-size: 20px;
          cursor: pointer;
          color: #2348e8;
        }
        .top20 {
          margin-top: 32px;
        }
        .el-form-item {
          width: 100%;
          display: flex;
          align-items: center;
          margin-bottom: 20px !important;
          .el-form-item__label {
            width: 84px;
            text-align: left;
          }
          .el-form-item__content {
            flex: 1;
            .el-select.el-select--small {
              width: 100%;
            }
          }
        }
        // 单-角色配置
        .qxForm {
          margin-bottom: 10px !important;
          .el-form-item__label {
            padding-left: 8px;
            box-sizing: border-box;
          }
        }
        // 修改账号
        .lines_ {
          width: 98%;
          height: 1px;
          border: 1px solid #eeeeee;
          margin-bottom: 20px;
          position: absolute;
          left: 0;
          margin-left: 1%;
        }
        .tree-box {
          width: 100%;
          padding-left: 83px;
          box-sizing: border-box;
          .tree {
            border: 1px solid rgba(0, 0, 0, 0.15);
            padding: 10px;
            box-sizing: border-box;
            height: 200px;
            .el-form-item__content {
              height: 100%;
              overflow-y: scroll;
            }
          }
        }
      }
    }
    .el-dialog__footer {
      text-align: center;
    }
  }
}
</style>
